﻿package mortal.game.view.rebate.openServerSevenDay.panel
{
    import com.mui.controls.*;
    import extend.language.*;
    import flash.events.*;
    import mortal.common.global.*;
    import mortal.game.cache.*;
    import mortal.game.resource.*;
    import mortal.game.utils.*;
    import mortal.game.view.common.*;
    import mortal.game.view.signUp.view.*;

    public class RedPacketPanel extends SignUpViewBase
    {
        protected var _reBtn:GLoadingButton;
        protected var _totalM:GTextFiled;

        public function RedPacketPanel()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this.pushUIToDisposeVec(UIFactory.bg(-7, -7, 699, 551, this, ImagesConst.MountWinBg));
            this.pushUIToDisposeVec(UIFactory.gImageBitmap(ImagesConst.RedPackTitleBg, 0, 0, this));
            this.pushUIToDisposeVec(UIFactory.gImageBitmap(ImagesConst.RedPackContentBg, 0, 223, this));
            this.pushUIToDisposeVec(UIFactory.gImageBitmap(ImagesConst.RedPackTxt_5, 18, 138, this));
            this.pushUIToDisposeVec(UIFactory.gBitmap(ImagesConst.Yuanbao, 524, 187, this));
            this.pushUIToDisposeVec(UIFactory.gTextField("" + Language.getString(71889), 20, 172, 320, 50, this, GlobalStyle.textFormatPutong.setColor(16777215).setSize(13), true));
            this._totalM = UIFactory.gTextField("", 377, 188, 160, 20, this);
            this._reBtn = UIFactory.gLoadingButton(ResFileConst.RebateDayRechargeOpenPage, 552, 180, 131, 36, this);
            this._reBtn.configEventListener(MouseEvent.CLICK, this.onGoToRechargeHd);
            this._reBtn.drawNow();
            this.updateRechargeMoney();
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._reBtn.dispose(param1);
            this._reBtn = null;
            this._totalM.dispose(param1);
            this._totalM = null;
            return;
        }// end function

        private function onGoToRechargeHd(event:MouseEvent) : void
        {
            GameUtil.gotoRecharge(ModuleTypeConst.RedPacketTipsPanel);
            return;
        }// end function

        public function updateRechargeMoney() : void
        {
            this._totalM.text = Language.getString(71890) + Cache.instance.rebate.rechargeSum;
            return;
        }// end function

    }
}
